package JLB_Chapter_05;
// StringBufferTest
public class code_05_37 {
    public static void main(String[] args) {
        StringBuffer sbf = new StringBuffer("ABCDEFG");
        int length = sbf.length();
        char chr = sbf.charAt(5);
        int index = sbf.indexOf("DEF");
        String substr = sbf.substring(0,2);
        StringBuffer tmp = sbf.replace(2,5,"123456");
        System.out.println(sbf);
        System.out.println(length);
        System.out.println(chr);
        System.out.println(index);
        System.out.println(substr);
        System.out.println(tmp);
    }
}
